﻿@model ZdSoft.Model.Course

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="layui-form-item">
        <h3 style="text-align:center;margin-top:10px">创建课件信息</h3>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })

        <div class="layui-form-item">
            @Html.LabelFor(model => model.CourseName, htmlAttributes: new { @class = "layui-form-label" })
            <div class="layui-input-block">
                @Html.EditorFor(model => model.CourseName, new { htmlAttributes = new { @class = "layui-input" } })
                @Html.ValidationMessageFor(model => model.CourseName, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="layui-form-item">
            @Html.LabelFor(model => model.CourseInfo, htmlAttributes: new { @class = "layui-form-label" })
            <div class="layui-input-block">
                @Html.EditorFor(model => model.CourseInfo, new { htmlAttributes = new { @class = "layui-input" } })
                @Html.ValidationMessageFor(model => model.CourseInfo, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="layui-form-item">
            @Html.LabelFor(model => model.CourseCode, htmlAttributes: new { @class = "layui-form-label" })
            <div class="layui-input-block">
                @Html.EditorFor(model => model.CourseCode, new { htmlAttributes = new { @class = "layui-input" } })
                @Html.ValidationMessageFor(model => model.CourseCode, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="button" value="取消" class="layui-btn" />
                <input type="submit" value="确认创建" class="layui-btn" />
            </div>
        </div>
    </div>
}

<script>
    $(function () {
        $("button").click(function () {
            parent.layer.closeAll();
        });
    });
</script>